package com.sjtu.web.form;

import com.sjtu.constants.TaskConstants;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * nerine
 * 1/28/2020
 */
@Getter
@Setter
@ToString
public class TaskInfoForm extends BaseForm {
    private String idTaskInfo;
    private String systemId;
    /** 任务名称 */
    @NotBlank
    private String taskName;
    /** 客户端执行该任务的spring的bean的名称 */
    @NotBlank
    private String beanName;
    /** 任务描述 */
    @NotBlank
    private String taskDesc;
    /** 定时任务表达式 */
    @NotBlank
    private String cron;
    /** 最短执行间隔 */
    @NotNull
    @Min(0)@Max(TaskConstants.DEFAULT_TASK_INTERVAL)
    private Integer leastInterval;
    /** 任务类型 */
    @NotNull
    private TaskConstants.TaskType taskType;
}
